<%@page import="java.util.Locale"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>

<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>   
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>
<%
Locale[] locales=Locale.getAvailableLocales();	//获取所有的文化
pageContext.setAttribute("list", locales);
Locale l=request.getLocale();	//得到当前文化
out.println("当前的文化信息："+l.getDisplayCountry()+":"+l.getDisplayName());
%>
<table>
<tr><th>显示名称</th><th>语言</th><th>日期</th></tr>
<jsp:useBean id="date" class="java.util.Date"></jsp:useBean>
<c:forEach var="locale" items="${list }">
<fmt:setLocale value="${locale }"/>
<tr>
<td>${locale.displayName }</td>
<td>${locale.language }</td>
<td><fmt:formatDate value="${date }"/></td>
</tr>
</c:forEach>

</table>

</body>
</html>